// F参考代码

#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
int a[MAXN], b[MAXN], c[MAXN], n, k;

struct Node {
  int i, j, k;
  Node(int i = 1, int j = 1, int k = 1) : i(i), j(j), k(k) {}
  long long val() const {
    return 1ll * a[i] * b[j] + 1ll * b[j] * c[k] + 1ll * c[k] * a[i];
  }
  bool operator<(const Node &t) const { return this->val() < t.val(); }
  long long idx() const {
    return 1ll * (1ll * (i - 1) * n + j - 1) * n + k - 1;
  }
};

priority_queue<Node> q;
set<long long> S;

int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; ++i)
    scanf("%d", a + i);
  for (int i = 1; i <= n; ++i)
    scanf("%d", b + i);
  for (int i = 1; i <= n; ++i)
    scanf("%d", c + i);
  sort(a + 1, a + n + 1, [](int x, int y) -> bool { return x > y; });
  sort(b + 1, b + n + 1, [](int x, int y) -> bool { return x > y; });
  sort(c + 1, c + n + 1, [](int x, int y) -> bool { return x > y; });
  q.push(Node(1, 1, 1));
  S.insert(Node(1, 1, 1).idx());
  Node now;
  while (k--) {
    now = q.top();
    q.pop();
    if (now.i + 1 <= n) {
      Node nxt = now;
      nxt.i++;
      if (!S.count(nxt.idx())) {
        S.insert(nxt.idx());
        q.push(nxt);
      }
    }
    if (now.j + 1 <= n) {
      Node nxt = now;
      nxt.j++;
      if (!S.count(nxt.idx())) {
        S.insert(nxt.idx());
        q.push(nxt);
      }
    }
    if (now.k + 1 <= n) {
      Node nxt = now;
      nxt.k++;
      if (!S.count(nxt.idx())) {
        S.insert(nxt.idx());
        q.push(nxt);
      }
    }
  }
  printf("%lld\n", now.val());
  return 0;
}